package com.fang.gulimall.admin.infrastructure.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName SpringDocConfig
 * @Description TODO
 * @Author fangge
 * @Date 2024/6/12 23:19
 */
@Configuration
public class SpringDocConfig {

    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(new Info().title("Gulimall后台管理系统")
                        .description("Gulimall API 演示")
                        .version("v1.0.0")
                        .license(new License().name("MIT 3.0").url("https://github.com/valarchie/AgileBoot-Back-End")))
                .externalDocs(new ExternalDocumentation()
                        .description("Gulimall后台管理系统接口文档")
                        .url("https://juejin.cn/column/7159946528827080734"));
    }

}

